import * as React from "react";
class App extends React.Component {
  state = { num: 1 };

  componentDidMount() {
    console.log(document.querySelector("#test").textContent);
    this.setState({
      num: 2,
    });
  }


  render() {
    return <div id="test">{this.state.num}</div>;
  }
}

export default App;
